import sys
sys.path.insert(0, 'lib/gaesessions.zip')
sys.path.insert(0, 'lib/xpath.zip')

from gaesessions import SessionMiddleware

COOKIE_KEY = 'ID_E49A93555FD033C21F118ABC5C35D040657FDDB56EF1D999075626BFD'

def webapp_add_wsgi_middleware(app):
	#from google.appengine.ext.appstats import recording
	app = SessionMiddleware(app, cookie_key=COOKIE_KEY)
	#app = recording.appstats_wsgi_middleware(app)
	return app